let BASE_URL = process.env.BASE_API

function URLConfig ( which, data ) {
  switch ( which ) {
    case 'login':
      return BASE_URL + 'user/login';
    case 'register':
      return BASE_URL + 'user/register';
    case 'verify':
      return BASE_URL + 'user/verify';
    case 'verifyPhone':
      return BASE_URL + 'user/verifyPhone';
    case 'smsCode':
      return BASE_URL + 'user/smsCode';
    case 'upload':
      return BASE_URL + 'common/upload';
    case 'getArea':
      return BASE_URL + 'common/area';
    default:
      throw new Error( "no such url named '" + which + "' in urlConfig" );
      return;
  }
}

export default URLConfig